package org.gpp.proj1.bone;

import java.util.Map;


/**
 * A bone structure definition
 *  
 * @author Paolo Victor, paolovictor@gmail.com
 */
public class BoneStructure {
	protected Bone root;
	protected Map<String, Bone> bones;
	protected Map<String, Map<String, Bone>> boneGroups;
	
	public BoneStructure( Bone root, Map<String, Bone> bones, Map<String, Map<String, Bone>> boneGroups ) {
		this.root = root;
		this.bones = bones;
		this.boneGroups = boneGroups;
	}
	
	public Bone getRoot() {
		return root;
	}
	
	public Bone getBone( String name ) {
		return bones.containsKey( name ) ? bones.get( name ) : null;
	}
	
	public Map<String, Bone> getBoneGroup( String groupName ) {
		return boneGroups.get( groupName );
	}
}
